<%@ Import Namespace="System.IO" %>
<script  runat="server">
Sub Page_Load(ByVal sender As Object, _
	ByVal e As EventArgs)
	Dim path1 As String = "c:\AUTOEXEC.BAT"
 Try
        Dim path2 As String = "c:\temp\MyTest"
        Dim path3 As String = "temp"

        If Path.HasExtension(path1) Then
            Response.Write("File has an extension." + _
	path1)
        End If

        If Path.HasExtension(path2) = False Then
            Response.Write("File has no extension." + _
	path2)
        End If

        If Path.IsPathRooted(path3) = False Then
            Response.Write( _
	"The string contains no root information." + _
	path3)
        End If

        Response.Write("The full path of file is ." +  _
	path3 + Path.GetFullPath(path3))
        Response.Write( _
	"File is the location for temporary files." + _
	 Path.GetTempPath())
        Response.Write( _
	"File is a file available for use." + _
	Path.GetTempFileName())

        Response.Write(Environment.NewLine & _
          "The set of invalid characters in a path is:")
        Response.Write( _
	"(Note that the wild card characters '*' " + _
	" and '?' are not invalid.):")



        Catch err As Exception
            Response.Write( _
	"<br>The process failed:" + err.ToString())
        End Try

End Sub
</script>


